<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateUserInregralRecordTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        //用户积分记录
        Schema::create('user_integral_record', function(Blueprint $table) {
            $table->increments('id')->comment('自增id');
            $table->integer('user_id')->default(0)->comment('用户标识');
            $table->string('order_num')->nullable()->comment('订单号');
            $table->integer('goods_id')->default(0)->comment('商品id');
            $table->string('goods_name')->nullable()->comment('商品名称');
            $table->integer('integral')->default(0)->comment('积分数量');
            $table->string('remark')->nullable()->comment('备注');
            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
